package com.baichang.taoshunda.service;

import com.baichang.framework.model.Page;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2018/3/1 0001.
 */
public interface CommonProblemService {
    /**
     *
     * @return
     */
    List<Map<String,Object>> queryAnswer(Integer type);

    /**
     * 添加问题
     * @param question
     * @param answer
     * @param type
     * @return
     */
    long addProblem(String question, String answer, Integer type);

    /**
     *
     * @param id
     * @param question
     * @param answer
     * @param type
     * @return
     */
    int updateProblem(Integer id, String question, String answer, Integer type);

    /**
     *
     * @param id
     * @return
     */
    int deleteProblem(Integer id);

    /**
     *
     * @param nowPage
     * @param pageSize
     * @return
     */
    Page queryProblem(int nowPage, int pageSize);
}
